package lanQiaoBei.数据结构.散列表_哈希表;

import java.io.*;

/*
 * 字符串哈希
 * 给定一段字符串str长度为n和 m个询问：l1,r1 l2,r2区间的字符串是否相等如果相等
 * 输出Yes否则输出NO
 * */

public class P3{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    final static int N=100010,P=131;
    static long h[]=new long[N],p[]=new long[N];
    static int n,m;
    static char[]str=new char[N];

    static long find(int l,int r){
    	   return h[r]-h[l-1]*p[r-l+1];
    }
    public static void main(String[]args)throws Exception{
        String[]ss=br.readLine().split(" ");
        n=Integer.parseInt(ss[0]);m=Integer.parseInt(ss[1]);
        br.read(str,1,n);
        br.readLine();
        //初始化
        p[0]=1;
        //计算字符串所有前缀的hash值
        for(int i=1;i<=n;i++){
            h[i]=h[i-1]*P+str[i];
            p[i]=p[i-1]*P;
        }
        //
        while(m-->0){
            ss=br.readLine().split(" ");
            int l1=Integer.parseInt(ss[0]),r1=Integer.parseInt(ss[1]),
                    l2=Integer.parseInt(ss[2]),r2=Integer.parseInt(ss[3]);
            long h1=find(l1,r1);
            long h2=find(l2,r2);
            if(h1==h2)System.out.println("Yes");
            else System.out.println("No");
        }
    }
}


//        "tQKqL1kGj1O5i0b7jOZp8hx7a4g4Rd6j7b7m1m7t6c2w8r6hJy0K5z2D8X8m8t9f1"
//        "4s5c5d8K3h3p9c2v2w1x6l3m5z2t0F3m3S8s2O8m8d2q1f1s7d1z2B4j9p7e6z5"
//        "7u5p3g7d4w7z3b7e3g4h3k5w5y7r2a7b9j3j6k8w5r2a6b2c8p1s9d4h5j2l9z8x5"
//        "6t6z9u2g5j4y6n2s6v6b2x7p2g2f8s2n4m6z5h6f3e3r1d7m6t6s7e8v4k6y2d7"
//        "8s3d4j1r7t6c5x2n5m8b3c9h7r4y3f1k9x2g4f5p2v5n8j1q1h7u2e7w7q3z1"
//        "5c7f9v2m8b3z1d9f3e4k5t7r4y2g1q7h3u4x1n2p5j6w2x7s8j5m3s2"
//        "2n7c8s4e1t3f9y6x7m4j6z8u3p5b2d7h1q1k9w5v3g2r1c9k2w2
/*
82 1
N5r2gS6gI6p6Xt3LrVvP1wS9yT5l9xG3hZ6dG4yT4p6zB8pN5mE8qD7mC8nA1wK2lD9eN7rW1yT5yG92N5
1 2 81 82
* */